package ca.etsmtl.gti785.classes;

import java.io.Serializable;
import java.util.Date;
import com.google.gson.Gson;

/**
 * This class is used for transfering servers infos between client sides and server sides (between teams in the meta-team).
 * @author Timothé Fillion-Brunet
 */
public class Infos implements Serializable{

	private static final long serialVersionUID = -6895533349675503730L;
	public String lon, lat, serverName;
	public Date lastAccess;
	
	public Infos(String lon, String lat, String serverName, Date lastAccess) 
	{
		this.lon = lon;
		this.lat = lat;
		this.serverName = serverName;
		this.lastAccess = lastAccess;
	}
	
	public String toJSON()
	{
		Gson gson = new Gson();
		return gson.toJson(this);
	}
}
